import { createApp } from "vue"
import "./style.css"
import App from "./App.vue"
import ElementPlus from "element-plus"
import zhCn from "element-plus/es/locale/lang/zh-cn"
import "element-plus/dist/index.css"
import router from "./router/index"

import HeaderModule from "./components/header/index.vue"
import FooterModule from "./components/footer/index.vue"
import VideoCardModule from "./components/videoCard/index.vue"
import VipCom from "./components/vipCom/index.vue"
import VipHeader from "./components/vipHeader/index.vue"
import Message from './components/message/index.vue'
import Pinia from "./stores"
import permission from "./permission"
permission()

//注册App组件实例
const app = createApp(App)

//注册全局组件
app.component("HeaderModule", HeaderModule)
app.component("FooterModule", FooterModule)
app.component("VideoCardModule", VideoCardModule)
app.component("VipCom", VipCom)
app.component("VipHeader", VipHeader)
app.component('Message',Message)

//全局注册ElementPlus
app
	.use(Pinia)
	.use(router)
	.use(ElementPlus, {
		locale: zhCn,
	})
	.mount("#app")
